<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>.: cPanel - <%=LG::LANG%> :.</title>
	<?php $this->import()?>
	<script type="text/javascript">
		$(function() {
			$("#name").focus();
		});
	</script>
	<script type="text/javascript">
		function confirmDelete(name) {
			var msg = "<%=$MSG_CONFIRM%>";
			return confirm(msg.replace("<%=LG::VAL%>",name));
		}
	</script>
</head>
<body>
	<?php $this->header()?><br/>
		<table width="100%"><tr>
			<td align="left" width="50%"><a href="?c=lang&a=grid"><%=LG::LANGS%></a> ></td>
			<td align="right" width="50%"><a href="?c=lang&a=create"><%=LG::G_NEW%></a></td>
		</tr></table>
		<hr/>
		<center><form action="" method="post">
			<table class="grid" cellspacing="1" cellpadding="5">
				<tr>
					<th align="center"><%=LG::G_ORDER%></th>
					<th align="center" width="100"><%=LG::LANG_CODE%></th>
					<th align="center" width="320"><%=LG::G_NAME%></th>
					<th align="center" width="100"><%=LG::G_IMG%></th>
					<th align="center"><%=LG::G_EDIT%></th>
					<th align="center"><%=LG::G_DEL%></th>
					<th align="center"><%=LG::G_ACTIVE%></th>
				</tr>
				<?php $i = 1; foreach ($languages as $lang) { ?>
					<tr>
						<td align="center"><%=$i%></td>
						<td align="center"><%=$lang->code%></td>
						<td align="left"><%=$lang->name%></a></td>
						<td align="center"><img src="<%=Properties::LANG_DIR%>/<%=$lang->code%>.<%=Image::EXT_PNG%>"/></td>
						<td align="center"><a href="?c=lang&a=edit&code=<%=$lang->code%>"><%=LG::G_EDIT%></a></td>
						<td align="center"><a href="?c=lang&a=del&code=<%=$lang->code%>" onclick="return confirmDelete('<%=$lang->name%>')">Delete</a></td>
						<td align="center"><%=Html::checkbox('codes[]', $lang->code, $lang->active > 0, '', 'active')%></td>
					</tr>
				<?php $i++; } ?>
				<?php if (sizeof($languages) == 0) { ?>
					<tr><td colspan="7" align="right"><%=str_replace(LG::ENTITY, LG::LANG, LG::MSG_EMPTY)%></td></tr>
				<?php } ?>
			</table>
			<?php if (sizeof($languages) > 0) { ?>
				<hr/>
				<input type="submit" value="<%=LG::F_SAVE%>"/>
			<?php } ?>
		</form></center>
		<br/>
	<?php $this->footer()?>
</body>
</html>